#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "HuJiang";

from util.sqlalchemy_util import *;
from datetime import datetime;


'''
News 对象
'''

class News(Base):
    # 指定表名
    __tablename__ = "news";

    # 指定编码
    __table_args__ = {
        "mysql_charset":"utf8"
    }

    # 指定主键列
    id = Column(Integer, primary_key=True, autoincrement=True, nullable=False);
    # 指定非主键列
    occur_date = Column(DateTime);
    subject = Column(String(255));
    content = Column(Text);
    create_date = Column(DateTime);

if __name__ == '__main__':
    # 初始化 user 表格
    init_table();